﻿
<!DOCTYPE html>
<html>
<head>
    <title>企捷云</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_1473753044_842232.css">
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/animate.css">
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/bootstrap3.3.5/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/default.css">
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/index.css"> 
    <link href="/ViewV5/CSS/BootOver.css" rel="stylesheet" />
    <style>
        .ms-controller, .ms-important, [ms-controller], [ms-important] {
            visibility: hidden;
        }

        .szhl_getPeoples {
            display: none;
        }
       
    </style>
</head>
<body ms-controller="JFBXUserLIST">
    <div style="margin-top:1rem;">

        <!-- 按条件选择 -->
        <div class="tab-filter-type">
            <!-- 搜索 -->
            <div class="oh">
                <div class="input-group ml15" style="width:295px;">
                    <input type="text" class="form-control" ms-duplex="searchcontent" placeholder="搜索单号,部门,申请人">
                    <span class="input-group-addon" ms-click="GetLIST()">搜索</span>
                </div>
            </div>
        </div>
        <!-- 表格 -->
        <div class="default-tab ft14 pt20">
            <table class="table table-striped table-responsive table-hover">
                <thead>
                    <tr>
                        <th class="tc">
                        </th>
                        <th style="width:100px;">
                            报销单号
                        </th>
                        <th >
                            报销标题
                        </th>
                        <th style="width:100px;">
                            总金额
                        </th>
                        <th style="width:100px;">
                            部门
                        </th>
                        <th style="width:100px;">
                            申请人
                        </th>
                        <th style="width:100px;">
                            申请时间
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr ms-repeat-el="ListData" >
                        <td class=" tc"></td>
                        <td>{{el.FormCode}}</td>
                        <td style="word-break:break-all">{{el.JFBXTitle}}</td>
                        <td>{{el.BXZJE}}</td>
                        <td>{{el.BranchName}}</td>
                        <td>{{el.ShenQingRen}}</td>
                        <td>{{el.CRDate|date("yyyy-MM-dd")}}</td>
                        <td>
                            <a class="cz-btn ft18 bj-color tip" data-toggle="tooltip" title="查看" ms-click="OpenView(el.ID,el.intProcessStanceid,$event)">
                                <i class="iconfont icon-look"></i>
                            </a>
                        </td>
                    </tr>

                </tbody>
                <tfoot>
                    <tr ms-if="!isnull">
                        <td colspan="2" style="text-align:center">合计</td>
                        <td>{{totalMoney}}(元)</td>
                        <td colspan="6"></td>
                    </tr>
                    <tr ms-if="isnull"><td class="tc"></td><td>暂无数据</td></tr>
                </tfoot>
            </table>
            
        </div>
    </div>

    <script type="text/javascript" src="/ViewV5/JS/jquery-1.11.2.min.js"></script>
    <script src="/ViewV5/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
    <script src="/ViewV5/JS/layer/layer.js"></script>
    <script src="/ViewV5/JS/layer/extend/layer.ext.js"></script>
    <script src="/ViewV5/JS/laypage/laypage.js"></script>
    <script src="/ViewV5/JS/toastr.js"></script>
    <script src="/ViewV5/JS/avalon1.47.js"></script>
    <script src="/ViewV5/JS/SZHLCommon.js?jsver=20160915"></script>
    <script>

        var tempindex = avalon.define({
            $id: "JFBXUserLIST",
            curXJType: "",
            month: ComFunJS.getQueryString("month"),
            user: ComFunJS.getQueryString("username"), 
            searchcontent: "",
            ListData: [],
            isnull: false,
            totalMoney:0,
            GetLIST: function () { 
                tempindex.ListData.clear();
                $.getJSON('/API/VIEWAPI.ashx?Action=JFBX_GEUSERJFBXLIST', {  Content: tempindex.searchcontent,month: tempindex.month, username: tempindex.user }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        tempindex.ListData = resultData.Result;
                        tempindex.totalMoney = resultData.Result1;
                        if (tempindex.ListData.size() == 0) { tempindex.isnull = true; } else { tempindex.isnull = false; } 
                    }
                })
            }, OpenView: function (ID, PIID,event) {
                
                location.href = "/ViewV5/AppPage/APPVIEW.html?FormCode=JFBX_JFBX&ID=" + ID + "&PIID=" + PIID + "&isback=Y&r=" + Math.random();
            }
        })
        avalon.ready(function () {
            tempindex.GetLIST();
            ComFunJS.initForm();
        })
    </script>
</body>

</html>